<template>
  <div>
    {{ message }}
  </div>
  <div>{{ num }}</div>
  <el-button @click="clickChild">点击子组件按钮</el-button>
</template>
<script setup lang="ts">
defineProps({
  message: String,
  num: Number,
});
const emit = defineEmits(["tellParent"]);
const clickChild = () => {
  const num = Math.floor(Math.random() * 10);
  console.log(num);
  emit("tellParent", num);
};
</script>
<style lang="scss" scoped></style>
